package com.usian.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.usian.mapper.LocalMessageMapper;
import com.usian.pojo.LocalMessage;
import com.usian.service.LocalMessageService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class LocalMessageServiceImpl implements LocalMessageService {
    @Resource
    private LocalMessageMapper localMessageMapper;
    @Override
    public List<LocalMessage> selectlocalMessageByStatus() {
        QueryWrapper<LocalMessage> localMessageQueryWrapper = new QueryWrapper<>();
        localMessageQueryWrapper.eq("state",0);
        List<LocalMessage> localMessages = localMessageMapper.selectList(localMessageQueryWrapper);
        return localMessages;
    }
}
